<?php
defined('IN_MAIN') or exit('Invalid Access!');

function get_post(){
 foreach($_POST as $post=>$value){
  $value=trim($value);
  $post_a[$post]=get_magic_quotes_gpc()? $value : AddSlashes($value);
  $post_s[$post]=get_magic_quotes_gpc()? StripSlashes($value) : $value;
  $post_d[$post]=mysql_real_escape_string(get_magic_quotes_gpc()? StripSlashes($value) : $value);
  $post_h[$post]=nhtmlentities(get_magic_quotes_gpc()? StripSlashes($value) : $value);
 }
 return array("post_a"=>$post_a, "post_s"=>$post_s, "post_d"=>$post_d, "post_h"=>$post_h);
}

function get_get(){
 foreach($_GET as $get=>$value){
  $value=trim($value);
  $get_a[$get]=get_magic_quotes_gpc()? $value : AddSlashes($value);
  $get_s[$get]=get_magic_quotes_gpc()? StripSlashes($value) : $value;
  $get_d[$get]=mysql_real_escape_string(get_magic_quotes_gpc()? StripSlashes($value) : $value);
  $get_h[$get]=nhtmlentities(get_magic_quotes_gpc()? StripSlashes($value) : $value);
 }
 return array("get_a"=>$get_a, "get_s"=>$get_s, "get_d"=>$get_d, "get_h"=>$get_h);
}

function get_cookie(){
 foreach($_COOKIE as $cook=>$value){
  $value=trim($value);
  $cookie_a[$cook]=get_magic_quotes_gpc()? $value : AddSlashes($value);
  $cookie_s[$cook]=get_magic_quotes_gpc()? StripSlashes($value) : $value;
  $cookie_d[$cook]=mysql_real_escape_string(get_magic_quotes_gpc()? StripSlashes($value) : $value);
  $cookie_h[$cook]=nhtmlentities(get_magic_quotes_gpc()? StripSlashes($value) : $value);
 }
 return array("cookie_a"=>$cookie_a, "cookie_s"=>$cookie_s, "cookie_d"=>$cookie_d, "cookie_h"=>$cookie_h);
}
?>